import axios from 'axios'

export const findConsumerList = (current, size, supplierVo) => {
  return axios({
    url: '/api/consumer/findConsumerList',
    method: 'post',
    /*localhost:8080/user?id=  方式传值*/
    params: {
      current,
      size
    },
    /*json数据传值*/
    data: supplierVo
  })
}

//获取所有来源
export const getAllConsumerList = () => {
  return axios({
    url: '/api/consumer/getAllConsumerList',
    method: 'get',
  })
}

//删除来源
export const deleteConsumerById = (id) => {
  return axios({
    url: '/api/consumer/deleteConsumerById',
    method: 'delete',
    params: {
      id
    },
  })
}

//添加来源
export const addConsumer = (consumer) => {
  return axios({
    url: '/api/consumer/addConsumer',
    method: 'post',
    data: consumer
  })
}

//修改来源
export const updateConsumer = (consumer) => {
  return axios({
    url: '/api/consumer/updateConsumer',
    method: 'post',
    data: consumer
  })
}

